/*定于主题样式*/

.appTheme(@themename: dark,
    @textColor: #fff,
    @weakTextColor:#ddd,
    @sideColor: #3d3f53,
    @backgroundColor: #2a2c3f,
    @backgroundColorNav: #222336,
    @backgroundColorNavHide: #555555,
    @backgroundColorNavHideHover: #000000,
    @listHoverBackgroundColor: #3875d7,
    @lineTopShadowColor: #353535,
    @lineBottomShadowColor: #565656,
    @inputBackgroundColor: #595C76,
    @scaleColor: rgba(0, 0, 0, 0.2),
    @labelColor: #fff,
    @navItemBorderColor:#3d4253,
    @scrollShadowColor:rgba(120,120,120),
    @scrollTrackColor:#616161,
    @buttonBackgroundColor:#006eff,
    @outputSuccessTextColor:rgb(0, 153, 0),
    @outputErrorTextColor:#f92672,
    @matchBackgroundColor:#b9ca4a,
    @matchCurrentBackgroundColor:#9c3328,
    @ligthColor:#fff,
    @orange: orange,
    // @dialogTableBackgroundColor:#fff,
) {
    .themeCommon() {}

    .@{themename}_ide {
        *{
            &::-webkit-scrollbar-track {
                box-shadow: inset 0 0 0px @scrollShadowColor;
                background-color: @backgroundColor;
            }
            &::-webkit-scrollbar-thumb{
                box-shadow: inset 0 0 0px @scrollShadowColor;
                background-color: @scrollTrackColor;
                border:1px solid  @labelColor;
            }
            &::-webkit-scrollbar-corner{
                box-shadow: inset 0 0 0px @scrollShadowColor;
                background-color: @backgroundColor;
            }
        }
        .drag_side {
            background-color: @sideColor;
            position: absolute;
            &.drag_active{
                background-color: @buttonBackgroundColor; 
            }
        }

        .ide_header {
            background-color: @backgroundColor;
            border-bottom: 1px solid @sideColor;
        }

        .ide_tools {
            width: 80px;
            background-color: @backgroundColor;
        }

        .ide_nav {
            background-color: @backgroundColorNav;

            .nav_header {
                background-color: @backgroundColor;
                border-bottom: 1px solid @sideColor;
            }
        }

        .ide_nav_open,.ide_func_open {
            background-color: @backgroundColorNavHide;

            &:hover {
                background-color: @backgroundColorNavHideHover;
            }
        }

        .ide_bottom {
            background-color: @backgroundColor;
        }
        .ide_console_open{
            background-color: @backgroundColorNavHide;

            &:hover {
                background-color: @backgroundColorNavHideHover;
            }
        }
        .ide_func {
            background-color: @backgroundColor;
            .func_header {
                background-color: @backgroundColor;
                border-bottom: 1px solid @sideColor;
            }
        }
        .code_nav{
            background-color: @backgroundColor;
            border-bottom:1px solid @navItemBorderColor;
        }
        .code_nav_l{
           
            .code_nav_c{
                .code_nav_i{
                    background-color: @backgroundColorNav;
                    text-shadow:0 1px @scaleColor;
                    color:@labelColor;
                    border:1px solid @navItemBorderColor;
                    &:hover,&.code_nav_select{
                        background-color: @inputBackgroundColor;
                    }
                }
            }
        }
        .structure_ls{
            .dec_ls{
                color:@labelColor;
            }
        }
        // 文件树
        .file_tree,
        .file_tree.tea-tree--full-line {
            color: @textColor;
            *,
            *:hover {
                background-color: transparent;
            }
    
            .tea-tree__node {
                background-color: transparent;
    
                .tea-tree__node-content:hover {
                    background-color: @inputBackgroundColor;
                }
    
                &.is-selected {
                    background-color: @inputBackgroundColor;
    
                    &>.tea-tree__node-content {
                        background-color: transparent;
    
                        .tea-tree__label {
                            background-color: transparent;
                        }
                    }
                }
            }
        }
    
    
        .tea-input,
        .tea-dropdown-btn.tea-dropdown__header {
            background: @inputBackgroundColor;

            &::placeholder{
                color: @labelColor;
            }
        }

        .tea-input,
        .tea-dropdown {
            color: @textColor;
            .tea-text-weak{
                color: @weakTextColor !important;
            }
        }
        .side_tab_form {
    
            .tea-form__label {
    
                label {
                    color: @labelColor !important;
                }
            }
    
            // 长按钮
            .full-btn {
    
                &.is-disabled,
                &.is-disabled:active,
                &.is-disabled:hover {
                    border-color: @buttonBackgroundColor;
                    background-color: transparent;
                    color: @buttonBackgroundColor;
                }
            }
    
            // 灰色文本
            .gray-text {
                color: @labelColor;
            }
    
            .extra-info-list {
                background-color: @sideColor;
    
                .left {
                    .extra-info-text {
                        color: @textColor !important;
                    }
                }
            }
        }
    
    
        .nav_tab {
    
            .compile-btn-loading {
                background: @buttonBackgroundColor;
                color: @textColor;
            }
    
            .compile-result {
    
                .compile_error,
                .compile_success {
                    background-color: @inputBackgroundColor;
                }
    
                .compile_error p,
                .compile_success p {
                    color: @labelColor;
                }
    
                .compile_file {
                    color: @textColor;
                }
            }
    
            .label {
                color: @labelColor;
            }
    
            .params-container {
    
                .param {
                    background-color: @sideColor;
    
                    .left {
    
                        .key,
                        .value {
    
                            span {
                                color: @textColor;
                            }
    
                            .input-value-container {
    
                                input {
                                    background-color: @inputBackgroundColor;
                                    color: @textColor;
                                }
                            }
                        }
                    }
                }
            }
    
            .form-switch {
                color: @labelColor;
            }
    
            .crosscontract-container {
    
                .crosscontract-item {
    
                    .tea-dropdown__header {
                        background: @inputBackgroundColor;
                    }
                }
            }
    
            .debug-btns {
    
                .tea-btn {
                    color: @textColor;
                }
    
                .tea-btn--weak {
                    background-color: transparent;
                    border: 1px solid @buttonBackgroundColor;
                    color: @buttonBackgroundColor;
                }
            }
    
            .debug-btn-loading {
                background: @buttonBackgroundColor;
                color: @textColor;
            }
    
            .debug-extens-btns {
    
                .tea-btn--text {
                    color: @buttonBackgroundColor;
    
                    &:hover {
                        background-color: transparent;
                    }
                }
            }
    
            .debug-result {
    
                .label {
                    color: @textColor;
                }
    
                .content {
                    background-color: @inputBackgroundColor;
                    color: @textColor;
                }
            }
    
            .deploy-result {
    
                .white-text {
                    color: @textColor !important;
                }
    
                .content {
                    background-color: @inputBackgroundColor;
                    color: @textColor;
                }
            }
        }
    
        .ide_bottom {
            background-color: @backgroundColor;
    
            .tabs {
                background: @sideColor;
    
                >div {
                    border: 1px solid @navItemBorderColor;
                    background-color: @backgroundColorNav;
                    color: @labelColor;
                    text-shadow: 0 1px @scaleColor;
                    border-right: 1px solid @navItemBorderColor;
                    &.current {
                        color: @textColor;
                        text-shadow: 0 1px @scaleColor;
                        background-color: @inputBackgroundColor;
                    }
                }
    
            }
    
            .tabs-search-wrapper {
                color: @textColor;
    
                .search-tools {
    
                    .tabs-search {
                        background-color: @inputBackgroundColor;
                        color: @textColor;
                        &::placeholder{
                            color:@labelColor;
                        }
                    }
    
                    .tabs-search-icon {
                        color: @labelColor;
                    }
                }
    
            }
    
    
            .tabs-panel {
                background-color: @backgroundColor;
                color: @textColor;
            }
    
            //  输出
            .output {
    
                p {
                    .start-build,
                    .notification-run {
                        color: @labelColor
                    }
    
                    .build-succ,
                    .notification-succ {
                        color:@outputSuccessTextColor ;
                    }
    
                    .build-error,
                    .notification-error,
                    .stderr,
                    .error {
                        color: @outputErrorTextColor;
                        a{
                            color: @outputErrorTextColor;
                            text-decoration: underline;
                        }
                    }
                    .warning{
                        color: @orange;
                        a{
                            color: @orange;
                            text-decoration: underline;
                        }
                    }
                    .info{
                        color: @textColor;
                        a{
                            color: @textColor;
                            text-decoration: underline;
                        }
                    }
                }
    
                .match {
                    background-color: @matchBackgroundColor;
    
                    &.match_current {
                        background-color: @matchCurrentBackgroundColor;
                    }
                }
            }
        }
    
        .ideevent {
    
            table {
                border: solid 1px @inputBackgroundColor;
                color: @textColor;
    
                tr {
    
                    &:nth-child(even) {
                        background: @sideColor;
                    }
                }
    
                .header {
                    background: @inputBackgroundColor;
                }
    
                .number {
                    border-right: solid 1px @inputBackgroundColor;
                }
    
                .topic {
                    border-right: solid 1px @inputBackgroundColor;
                }
            }
        }
    
        .worldstate {
           
            .worldstate-form {
                border: 1px solid @inputBackgroundColor;
    
                .header {
                    background: @inputBackgroundColor;
    
                    div {
                        background-color: @inputBackgroundColor;
                    }
                }
    
                .table-body {
                    .cont {
    
                        .cont-list {
    
                            .item {
                                border-top: 1px solid @inputBackgroundColor;
    
                                &>div {
                                    color: @textColor;
                                    border-left: 1px solid @inputBackgroundColor;
                                }
    
    
                                .key-withbtn {
    
                                    .open-btn {
    
                                        &::after {
                                            border-top: 6px solid transparent;
                                            border-bottom: 6px solid transparent;
                                            border-left: 8px solid @textColor;
                                            border-right: 0px;
                                        }
                                    }
                                }
    
                                textarea {
                                    background-color: transparent;
                                    color: @textColor;
                                    border-left: 1px solid @inputBackgroundColor;
                                }
    
                            }
                        }
    
                        .open {
                            .item {
                                background: @inputBackgroundColor;
                            }
                        }
                    }
    
                }
            }
        }
        .ͼ1 .cm-panel.cm-search [name=close]{
            color: @textColor;
        }
    }

    .@{themename}_model {
        .tea-dialog__inner {
            background-color: @backgroundColor;
            padding: 0;

            .tea-dialog__header {
                color: @textColor;
                padding: 12px 10px;
                height: 22px;
                box-sizing: content-box;
                background-color: @sideColor;

                .tea-dialog__headertitle {
                    margin-bottom: 0;
                }

                .tea-btn--icon {
                    right: 8px;
                    top: 8px;

                    &:hover {
                        background-color: @scaleColor;
                    }
                }
            }

            .tea-dialog__body {
                padding: 20px 24px;
                .tea-dialog__messagetitle,
                .tea-dialog__messagetext {
                    color: @textColor;
                }
                .tea-form {
                    .tea-form__item {
                        .tea-form__label {
                            color: @labelColor;
                        }

                        .tea-dropdown-btn.tea-dropdown__header {
                            background: @inputBackgroundColor;
                            border: none;
                            color: @textColor;
                        }
                    }
                }
            }

            .tea-dialog__footer {
                box-shadow: 0 1px 0 0 @lineTopShadowColor inset;
                margin: 0;
                padding: 10px;

                .tea-btn {
                    padding: 0 40px;
                }
            }

            .tea-input {
                background-color: @inputBackgroundColor;
                color: @textColor;
                &::placeholder{
                    color:@weakTextColor;
                }
            }
        }

        .alert-modal__cotent {
            font-size: 14px;
            color: @textColor;
        }
        .dialog-sub-t{
            color: @textColor;
            margin-bottom: 10px;
            font-size: 14px;
        }
        .new-template-list{
            display: flex;
            margin-left: -10px;
            flex-wrap: wrap;
        }

        .new-template-list + .tea-icon-valid{
            top: 7px;
            right: 0px;
        }
        .new-template-item{
            width: 127px;
            padding: 3px;
            margin-left: 10px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: @ligthColor;
            border:4px solid @ligthColor;
            cursor: pointer;
            .new-template-title{
                color: @backgroundColorNavHideHover;
                font-size: 14px;
            }
            img{
                width:100%;
            }
            &.active{
                border-color: @buttonBackgroundColor;
            }
            &:hover{
                border-color: @listHoverBackgroundColor; 
            }
        }
        .dialog-table{
            padding: 10px;
        }
        .tea-pagination{
            padding-top:20px;
            .tea-pagination__turnbtn{
                background-color: @sideColor;
            }
            .tea-icon-arrowleft{
                background-image: url(./static/images/left.png);
                background-size: 12px 12px;
                background-position: center;
            }
            .tea-icon-arrowright{
                background-image: url(./static/images/right.png);
                background-size: 12px 12px;
                background-position: center;
            }
        }
        .tea-pagination,
        .tea-dropdown,
        .tea-pagination__state{
            color: @textColor;
        }
        .tea-table{
            border: 1px solid @sideColor;
            background-color: @sideColor;
            .tea-table__header{
                border-bottom: 0px;
                thead{
                    tr{
                        background-color: @sideColor;
                    }
                }
            }
            .tea-table__body{
                border-bottom: 0px;
                tr{
                    &:nth-child(2n-1){
                        background-color: @backgroundColor;
                    }
                }
            }
            .tea-table__box{
                th{
                    &>div{
                        color: @textColor;
                    }
                }
                tr{
                    &>td{
                        color: @textColor;
                        border-bottom: 0px;
                    }
                    &:hover{
                        background-color: @backgroundColorNavHideHover;
                    }
                }
            }
        }

        .tea-text-weak{
            color: @weakTextColor !important;
        }

        .tea-form__help-text{
            color: @weakTextColor;
        }
        // , .tea-pagination__turnbtn.is-disabled:focus, .tea-pagination__turnbtn.is-disabled:hover
    }

}

